LanguageModelCallParams

data class LanguageModelCallParams(val messages: List<ModelMessage>, val tools: List<LanguageModelTool> = emptyList(), val toolChoice: ToolChoice = ToolChoice.Auto, val temperature: Float? = null, val topP: Float? = null, val topK: Int? = null, val maxOutputTokens: Int? = null, val stopSequences: List<String> = emptyList(), val seed: Int? = null, val providerOptions: Map<String, JsonElement> = emptyMap(), val abortSignal: AbortSignal = AbortSignalNever, val presencePenalty: Float? = null, val frequencyPenalty: Float? = null, val responseFormat: ResponseFormat = ResponseFormat.Text, val headers: Map<String, String> = emptyMap())

Single parameter envelope for both generate and stream so middleware can wrap both the same way and wrapLanguageModel only needs one pass-through shape.

Constructors

Link copied to clipboard
constructor(messages: List<ModelMessage>, tools: List<LanguageModelTool> = emptyList(), toolChoice: ToolChoice = ToolChoice.Auto, temperature: Float? = null, topP: Float? = null, topK: Int? = null, maxOutputTokens: Int? = null, stopSequences: List<String> = emptyList(), seed: Int? = null, providerOptions: Map<String, JsonElement> = emptyMap(), abortSignal: AbortSignal = AbortSignalNever, presencePenalty: Float? = null, frequencyPenalty: Float? = null, responseFormat: ResponseFormat = ResponseFormat.Text, headers: Map<String, String> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard

Penalty proportional to how often a token has appeared. Mirrors v6's CallSettings. Null = provider default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Penalty for repeating tokens that already appeared in the response, regardless of frequency. Mirrors v6's CallSettings (per historical parity gap #3 closure). Null = provider default.

Link copied to clipboard
val providerOptions: Map<String, JsonElement>
Link copied to clipboard

Wire-level shape constraint. Mirrors v6's LanguageModelV3CallOptions.responseFormat (per historical parity gap #20). Providers that support constrained decoding honor it; others ignore. Default ResponseFormat.Text = no constraint.

Link copied to clipboard
val seed: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val topK: Int?
Link copied to clipboard
val topP: Float?